<template>
    <div class="pagination">
        <el-pagination background layout="prev, pager, next" v-model:page-size="pagination.size" :total="pagination.total"
        v-model:current-page="pagination.page" @current-change="currentChange" v-if="pagination.total != 0" />
    </div>
</template>

<script lang="ts" setup>

const { pagination } = defineProps({
    pagination: {
        type: Object, // 接收的参数类型
        default: {
            page: 1,
            size: 10,
            total: 0,
        } //默认值
    },
})

const emit = defineEmits(['currentChange',])

const currentChange = () => {
    emit('currentChange', pagination.page)
}
</script>

<style lang="less" scoped>
.pagination {
    box-sizing: border-box;
    // padding-left: 600px;
    // width: 1500px;
    margin-top: 50px;
    // position: absolute;
    // left: 50%;
    // transform: translateX(-50%);
    bottom: 50px;



}
</style>